from django.contrib.auth.models import AbstractUser
from django.db import models


# Create your models here.
class User(AbstractUser):
    mobile = models.CharField(max_length=11, unique=True)  # 扩写了手机号，唯一
    icon = models.ImageField(upload_to='icon', default='icon/default.png')  # 需要安装pillow模块

    class Meta:
        db_table = 'swim_user'  # 修改表名

        verbose_name = '用户表'
        verbose_name_plural = verbose_name  # 在admin中显示表名为用户表
